#!/bin/bash
./prebuild.sh
if [ $# -eq 0 ];then
    echo "请输入参数:make / cmake "
    exit
elif [ $1 = "make" ];then
    make -j12
elif [ $1 = "cmake" ];then
    cmake -Bbuild -GNinja .
    if [ $? -ne 0 ]; then
        echo -e "\e[31m cmake config fail \e[0m"
    else
        cmake --build ./build
    fi
else
    echo -e "\e[31m input error \e[0m"
fi